'use strict';
var calculate_average = function(collection){
    let sum=0;
    let num=0;
    for(let i in collection){
        if(i%2!=0){
            sum+=collection[i];
            num++;
        }
    }
    let average=sum/num;
    console.log(average);
    return average;
}
module.exports = calculate_average;
calculate_average([1, 2, 3, 4, 5, 6]);